from django.urls import path

# from oracle.views import user
from oracle.views import role, menu, distribute, deploy, parameters, user

app_name = "oracle"

urlpatterns = [
    path('role/list/', role.role_list, name='role_list'),
    path('role/add/', role.role_add, name='role_add'),
    path('role/edit/<slug:key>/', role.role_edit, name='role_edit'),
    path('role/del/<slug:key>/', role.role_del, name='role_del'),

    # 用户表为可继承类，实体管理失效
    # path('user/list/', user.user_list, name='user_list'),
    # path('user/add/', user.user_add, name='user_add'),
    # path('user/edit/<slug:key>/', user.user_edit, name='user_edit'),
    # path('user/del/<slug:key>/', user.user_del, name='user_del'),
    # path('user/resetpassword/<slug:key>/', user.user_password_reset, name='user_reset_pwd'),

    path('menu/list/', menu.menu_list, name='menu_list'),
    path('menu/add/', menu.menu_add, name='menu_add'),
    path('menu/edit/<slug:key>/', menu.menu_edit, name='menu_edit'),
    path('menu/del/<slug:key>/', menu.menu_del, name='menu_del'),
    path('menu/iconlist/', menu.menu_icon_list, name='menu_icon_list'),

    path('permission/add/', menu.permission_add, name='permission_add'),
    path('permission/edit/<slug:key>/', menu.permission_edit, name='permission_edit'),
    path('permission/del/<slug:key>/', menu.permission_delete, name='permission_del'),
    path('multi/permissions/add/', menu.multi_permission_add, name='multi_permission_add'),
    path('multi/permissions/delete/', menu.multi_permission_delete, name='multi_permission_delete'),
    path('menulink/', menu.menu_link_add, name='menu_link_add'),

    path('distribute/permissions/', distribute.distribute, name='distribute_permissions'),
    path('distribute/info/', distribute.distribute_info, name='distribute_info'),

    path('deploy/url/list/', deploy.url_list, name='deploy_url_list'),
    path('deploy/url/add/', deploy.url_add, name='deploy_url_add'),
    path('deploy/url/edit/<slug:key>/', deploy.url_edit, name='deploy_url_edit'),
    path('deploy/url/del/<slug:key>/', deploy.url_del, name='deploy_url_del'),

    path('params/', parameters.ParametersHandle.as_view(), name="get_params"),
]
